<template>
  <div class="container">
    <div class="item1">
      <div class="xiala">
        <el-col :span="24">
          <el-menu
            router
            default-active="2"
            class="el-menu-vertical-demo"
            @open="handleOpen"
            @close="handleClose"
          >
            <el-sub-menu index="1">
              <template #title>
                <span>练习室</span>
              </template>
              <el-menu-item index="/practive" style="color: red"
                >我的练习室</el-menu-item
              >
            </el-sub-menu>
            <el-menu-item index="/practive/mediaCache" >缓存</el-menu-item>
            <el-button text @click="open" style="margin-left:5px;color: black;">音频库</el-button>
            <el-menu-item index="/practive/Collections">收藏</el-menu-item>
            <el-menu-item index="/practive/viewRecords">历史</el-menu-item>
          </el-menu>
        </el-col>
      </div>
      <!-- <div class="left"></div> -->
    </div>
    <div class="item2">
      <div class="headerItem" >
        <div class="header-tab-item hoverable " :class="flag===1?'active':''" @click="flag=1">
          <span class="title "  >资源</span>
        </div>
        <div class="header-tab-item hoverable"  :class="flag===2?'active':''" @click="flag=2">
          <span class="title" >视频课</span>
        </div>
        <div class="header-tab-item hoverable" :class="flag===3?'active':''" @click="flag=3">
          <span class="title">直播课</span>
        </div>
      </div>
      <div class="right">
        <div class="demo-input-size" style="margin-top: 15px">
          <el-row :gutter="46">
            <el-col :span="7" style="margin-left: 40px">
              <el-input
              v-model="input1"
                  class="w-50 m-2"
                  size="large"
                  :prefix-icon="Search"
                  style="width: 300px"
            /></el-col>
            <el-col :span="6"
              ><el-button type="info" plain style="height: 40px"
                >搜索</el-button
              ></el-col
            >
          </el-row>
        </div>
        <Huancun/>
        <!-- <div class="noContain"><span>无更多数据</span></div> -->
      </div>
    </div>
  </div>
</template>

<!-- <script lang="ts" >
import huancun from '../../../components/practive/huancun/hauncun.vue'
  
export default {
  name: "mediaCache",
  components:{
    huancun,
  },

};
</script> -->

<script lang="ts" setup>
import { ref } from "vue";
import Huancun from '../../../components/practive/huancun/hauncun.vue'
  

import { ElMessage, ElMessageBox } from 'element-plus'
import type { Action } from 'element-plus'
import {
  Document,
  Menu as IconMenu,
  Location,
  Setting,
} from "@element-plus/icons-vue";
import { Search } from '@element-plus/icons-vue'
const input1 = ref('')


let flag =ref(0);
const handleOpen = (key: string, keyPath: string[]) => {
  console.log(key, keyPath);
};
const handleClose = (key: string, keyPath: string[]) => {
  console.log(key, keyPath);
};

const open = () => {
  ElMessageBox.alert('请打开中舞网APP，点击"练习室"-"音频库"中查看。', {
    
    confirmButtonText: '确定',
    // callback: (action: Action) => {
    //   ElMessage({
    //     type: 'info',
    //     message: `action: ${action}`,
    //   })
    // },
  })
}


// const allRef = ref()
// console.log(allRef);
</script>

<style scoped>
.container {
    background-color: #c1c1c1;
    width: 1200px;
    margin: auto;
    font-size: 14px;
    display: flex;
  }
  .xiala {
    width: 170px;
    border-radius: 5px;
    height: 50px;
    line-height: 50px;
  }
  
  /* .left {
    width: 170px;
    height: 200px;
    border-radius: 5px;
    margin-top: 10px;
  } */
  
  .headerItem {
    width: 1020px;
    height: 100px;
    background-color: #fff;
    border-radius: 5px;
    float: right;
    display: flex;
    align-items: center;
  }
.active{
  border-bottom: solid 3px hotpink;
}

.header-tab-item {
  display: flex;
  
  padding: 28px 40px;
}

.right {
  width: 1020px;
  height: 730px;
  background-color: #fff;
  border-radius: 5px;
  float: right;
  margin-top: 10px;
}
.noContain{
 text-align: center;
 height: 80px;
 line-height: 80px;
 border-bottom: solid 1px #606266;
 color: #606266;
}
</style>
